﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;

namespace LMA
{
  static class Program
  {
    /// <summary>
    /// The main entry point for the application.
    /// </summary>
    [STAThread]
    static void Main()
    {
      // Config application
      Application.EnableVisualStyles();
      Application.SetCompatibleTextRenderingDefault(false);

      // Build components
      mainForm myForm = new mainForm();
      CMD myCMD = new CMD();
      SDL mySDL = new SDL();

      // Connect components
      // Prerequisite: mainForm must be enhanced to contain Command1 and Command2 events
      myForm.cmdCommand += new mainForm.CommandEventHandler(myCMD.OnCommand);
      myForm.cmdCommand += new mainForm.CommandEventHandler(CMD.OnCommandStatic);

      myForm.sdlCommand += new mainForm.CommandEventHandler(mySDL.OnCommand);
      myForm.sdlCommand += new mainForm.CommandEventHandler(SDL.OnCommandStatic);

      // Run application
      Application.Run(myForm);
    }
  }
}
